//
//  EasyShowUtils.h
//  EasyShowViewDemo
//
//  Created by nf on 2017/11/24.
//  Copyright © 2017年 chenliangloveyou. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import "UIColor+Extra.h"
//#import "FMDatabase.h"

// 是否为空
#define ISEMPTY_S(_v) (_v == nil || _v.length == 0)

#define SCREEN_WIDTH  [UIScreen mainScreen].bounds.size.width
#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height

//屏幕的高度
#define SCREEN_MAX_LENGTH_S (MAX(SCREEN_WIDTH, SCREEN_HEIGHT))

//屏幕是否是横屏状态
#define ISHORIZONTALSCREEM_S UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)
//retain屏
#define ISRETAIN_S ([[UIScreen mainScreen] scale] >= 2.0)
//屏幕尺寸判断
#define ISIPHONE_S   (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)

#define ISIPHONE_X_S  (ISIPHONE_S && SCREEN_MAX_LENGTH_S == 812.0f)  // iPhonex         5.8寸   375*812

#define maincolor @"#4200FF" //主色--蓝色
#define mainGradientColor @"#4200FF" //主色渐变色--蓝色
#define mainBlackColor @"#4200FF" //主色--黑灰
#define bgviewcolor  @"181E2E"
#define tThreeColor [UIColor colorWithHEX:@"333333"]
#define tSixColor [UIColor colorWithHEX:@"666666"]
#define tNineColor [UIColor colorWithHEX:@"999999"]
#define tTableViewCellLine [UIColor colorWithHEX:@"#E5E5E5"]
#define tMainColor [UIColor colorWithHEX:maincolor]
#define tBgQianColor [UIColor colorWithHEX:@"F8FCFF"]
#define tColor(n) [UIColor colorWithHEX:n]
#define tBackgroundColor [UIColor colorWithHEX:@"#f4f5f6"]

//statusbar默认高度 orginal
#define STATUSBAR_HEIGHT_S  (ISIPHONE_X_S ? (50) : 20 )

#define kEasyShowSafeBottomMargin_S  (ISIPHONE_X_S ? 34.0f : 0.0f )

//状态栏高度
#define NAVIGATION_HEIGHT_S (STATUSBAR_HEIGHT_S + 44.0)

#define kStatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height

#define kTabBarHeight   (kStatusBarHeight>20?83:49)
#define kTopHeight      (kStatusBarHeight + 44.0)

@interface EasyShowUtils : NSObject

+ (CGSize)textWidthWithStirng:(NSString *)string font:(UIFont *)font maxWidth:(CGFloat)maxWidth ;

+ (UIViewController *)topViewController ;

+ (UIImage *)imageWithColor:(UIColor *)color;
@end













